-
Notifications
You must be signed in to change notification settings - Fork 879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes maximum daily ads at 21 instead of 20 (follow up to #3849) #3806
Conversation
vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/frequency_capping.cc
Outdated
Show resolved
Hide resolved
...ads/src/bat/ads/internal/frequency_capping/exclusion_rules/per_day_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
...ads/src/bat/ads/internal/frequency_capping/exclusion_rules/per_day_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
...ads/src/bat/ads/internal/frequency_capping/exclusion_rules/per_day_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
...s/src/bat/ads/internal/frequency_capping/exclusion_rules/total_max_frequency_cap_unittest.cc
Show resolved
Hide resolved
...s/src/bat/ads/internal/frequency_capping/permission_rules/minimum_wait_time_frequency_cap.cc
Outdated
Show resolved
Hide resolved
...s/src/bat/ads/internal/frequency_capping/permission_rules/minimum_wait_time_frequency_cap.cc
Outdated
Show resolved
Hide resolved
...s/src/bat/ads/internal/frequency_capping/permission_rules/minimum_wait_time_frequency_cap.cc
Outdated
Show resolved
Hide resolved
...ve-ads/src/bat/ads/internal/frequency_capping/permission_rules/per_day_limit_frequency_cap.h
Outdated
Show resolved
Hide resolved
...t-native-ads/src/bat/ads/internal/frequency_capping/exclusion_rules/per_day_frequency_cap.cc
Outdated
Show resolved
Hide resolved
...s/src/bat/ads/internal/frequency_capping/permission_rules/minimum_wait_time_frequency_cap.cc
Outdated
Show resolved
Hide resolved
...s/src/bat/ads/internal/frequency_capping/permission_rules/minimum_wait_time_frequency_cap.cc
Outdated
Show resolved
Hide resolved
...e-ads/src/bat/ads/internal/frequency_capping/permission_rules/per_day_limit_frequency_cap.cc
Outdated
Show resolved
Hide resolved
...-native-ads/src/bat/ads/internal/frequency_capping/exclusion_rules/per_hour_frequency_cap.cc
Outdated
Show resolved
Hide resolved
...-native-ads/src/bat/ads/internal/frequency_capping/exclusion_rules/per_hour_frequency_cap.cc
Show resolved
Hide resolved
...t-native-ads/src/bat/ads/internal/frequency_capping/exclusion_rules/per_hour_frequency_cap.h
Outdated
Show resolved
Hide resolved
...ds/src/bat/ads/internal/frequency_capping/permission_rules/minimum_wait_time_frequency_cap.h
Outdated
Show resolved
Hide resolved
...ve-ads/src/bat/ads/internal/frequency_capping/permission_rules/per_day_limit_frequency_cap.h
Outdated
Show resolved
Hide resolved
...-native-ads/src/bat/ads/internal/frequency_capping/exclusion_rules/daily_cap_frequency_cap.h
Outdated
Show resolved
Hide resolved
...at-native-ads/src/bat/ads/internal/frequency_capping/exclusion_rules/per_day_frequency_cap.h
Outdated
Show resolved
Hide resolved
...-native-ads/src/bat/ads/internal/frequency_capping/exclusion_rules/total_max_frequency_cap.h
Outdated
Show resolved
Hide resolved
...ds/src/bat/ads/internal/frequency_capping/permission_rules/minimum_wait_time_frequency_cap.h
Outdated
Show resolved
Hide resolved
...ve-ads/src/bat/ads/internal/frequency_capping/permission_rules/per_day_limit_frequency_cap.h
Outdated
Show resolved
Hide resolved
...ads/src/bat/ads/internal/frequency_capping/exclusion_rules/per_day_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
...ds/src/bat/ads/internal/frequency_capping/exclusion_rules/per_hour_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
...s/src/bat/ads/internal/frequency_capping/exclusion_rules/total_max_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
...s/src/bat/ads/internal/frequency_capping/exclusion_rules/total_max_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
.../ads/internal/frequency_capping/permission_rules/minimum_wait_time_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
.../bat/ads/internal/frequency_capping/permission_rules/per_day_limit_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
.../ads/internal/frequency_capping/permission_rules/minimum_wait_time_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
...s/src/bat/ads/internal/frequency_capping/exclusion_rules/daily_cap_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
...e-ads/src/bat/ads/internal/frequency_capping/permission_rules/per_day_limit_frequency_cap.cc
Outdated
Show resolved
Hide resolved
...e-ads/src/bat/ads/internal/frequency_capping/permission_rules/per_day_limit_frequency_cap.cc
Outdated
Show resolved
Hide resolved
...ve-ads/src/bat/ads/internal/frequency_capping/permission_rules/per_day_limit_frequency_cap.h
Outdated
Show resolved
Hide resolved
.../bat/ads/internal/frequency_capping/permission_rules/per_day_limit_frequency_cap_unittest.cc
Outdated
Show resolved
Hide resolved
...-ads/src/bat/ads/internal/frequency_capping/permission_rules/per_hour_limit_frequency_cap.cc
Outdated
Show resolved
Hide resolved
101e4f8
to
507e8fa
Compare
|
||
namespace ads { | ||
|
||
const uint64_t kSecondsPerDay = base::Time::kSecondsPerHour * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be in empty namespace
above
: mock_ads_client_(std::make_unique<MockAdsClient>()), | ||
ads_(std::make_unique<AdsImpl>(mock_ads_client_.get())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 4 additional spaces
|
||
class PermissionRule { | ||
public: | ||
virtual ~PermissionRule() = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be = 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM++ but CI needs to run as it failed due to skip labels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM++
7a034e2
to
59bf4de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM++
Unrelated CI failure due to security tests |
Resolves brave/brave-browser#4207
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Regarding the original 4207 issue - see that issue for testing.
This PR refactors the core logic of the 'Should an Ad be shown' logic - as such, QA should check all functionality in this area.
For Sanity testing purposes...
Reviewer Checklist:
After-merge Checklist:
changes has landed on.